<style>
    .upload-image {
        background: url('__CDN__/assets/addons/example/img/plus.png') no-repeat center center;
        background-size: 30px 30px;
        height: 30px;
        width: 30px;
        border: 1px solid #ccc;
    }
</style>
<div class="panel panel-default panel-intro">
    <div class="panel-heading">
        <ul class="nav nav-tabs">
            <li class="active"><a href="#one" data-toggle="tab">{:__('会员配置')}</a></li>
        </ul>
    </div>
    <div class="panel-body">
        <div class="tab-content">
            <div class="tab-pane fade active in" id="one">
                <form id="one-form" role="form" data-toggle="validator" method="POST" action="{:url('user/config')}">
                    <input type="hidden" name="row[form]" value="user">
                    <div class="form-group row">
                        <label class="control-label col-xs-12">{:__('普通用户每天查询次数')}</label>
                        <div class="col-xs-12">
                            <input type="text" name="row[find_num]" value="{$userConfig['find_num']|default = '0'}" class="form-control" />
                        </div>
                    </div>
                    <div class="form-group row">
                        <label class="control-label col-xs-12">{:__('用户分享获取查询次数')}</label>
                        <div class="col-xs-12">
                            <input type="text" name="row[get_num]" value="{$userConfig['get_num']|default = '0'}" class="form-control" />
                        </div>
                    </div>
                    <div class="form-group row">
                        <label class="control-label col-xs-12">{:__('用户升级等级列表')}</label>
                        <div class="col-xs-12">
                            <table class="table fieldlist" data-template="eventtpl" data-name="row[event]" id="second-table">
                                <tr>
                                    <td>{:__('会员等级名称')}</td>
                                    <td>{:__('升级条件')}</td>
                                    <td>{:__('有效时间')}</td>
<!--                                    <td>{:__('升级图片')}</td>-->
                                    <td width="100"></td>
                                </tr>
                                <tr>
                                    <td colspan="4"><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></td>
                                </tr>
                            </table>
                            <textarea name="row[event]" class="form-control" cols="30" rows="5" style="display: none">{$userConfig['event'] | default = ''}</textarea>
                            <!--请注意实际开发中textarea应该添加个hidden进行隐藏-->
                            <script id="eventtpl" type="text/html">
                                <tr class="form-inline">
                                    <td><input type="text" name="<%=name%>[<%=index%>][name]" class="form-control" value="<%=row.name%>" placeholder="会员等级名称"/></td>
                                    <td><input type="text" name="<%=name%>[<%=index%>][price]" class="form-control" value="<%=row.price%>" placeholder="升级条件"/></td>
                                    <td><input type="text" name="<%=name%>[<%=index%>][day]" class="form-control" value="<%=row.day%>" placeholder="有效时间"/></td>
<!--                                    <td>-->
<!--                                        <input type="hidden" name="<%=name%>[<%=index%>][image]" id="c-image-<%=index%>" value="<%=row.image%>">-->
<!--                                        &lt;!&ndash;@formatter:off&ndash;&gt;-->
<!--                                        <button type="button" id="faupload-image" class="btn btn-danger faupload upload-image" data-input-id="c-image-<%=index%>" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" <%if(row.image){%>style="background-image: url('<%=Fast.api.cdnurl(row.image)%>')"<%}%>></button>-->
<!--                                        &lt;!&ndash;@formatter:on&ndash;&gt;-->
<!--                                    </td>-->
                                    <td>
                                        <!--下面的两个按钮务必保留-->
                                        <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                                        <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                                    </td>
                                </tr>
                            </script>
                        </div>

                    </div>
                    <div class="form-group row">
                        <label class="control-label col-xs-12"></label>
                        <div class="col-xs-12">
                            <button type="submit" class="btn btn-success btn-embossed">{:__('OK')}</button>
                            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>